package yxy.game.pm2.bean.db.po;

import yxy.apple.db.ResultObjectBuilder;

import java.util.Date;

/**
 * @author James
 * @date 2022/1/24 16:30
 **/
public class PrivilegePo {
    private String playerCode;
    private int type;
    private Date endTime;
    private long updateTime;

    public static ResultObjectBuilder<PrivilegePo> builder = rs -> {
        PrivilegePo privilegePo = new PrivilegePo();
        privilegePo.setPlayerCode(rs.getString("pCode"));
        privilegePo.setType(Integer.parseInt(rs.getString("type")));
        privilegePo.setEndTime(rs.getDate("endTime"));
        privilegePo.setUpdateTime(rs.getLong("updateTime"));
        return privilegePo;
    };

    public String getPlayerCode() {
        return playerCode;
    }

    public void setPlayerCode(String playerCode) {
        this.playerCode = playerCode;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "PrivilegePo{" +
                "playerCode='" + playerCode + '\'' +
                ", type=" + type +
                ", endTime=" + endTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
